package cn.yuanqiao.activiti.domain;

import cn.yuanqiao.common.annotation.Excel;
import cn.yuanqiao.common.exception.ServiceException;
import cn.yuanqiao.common.utils.StringUtils;
import cn.yuanqiao.common.core.domain.BaseEntity;
import cn.yuanqiao.common.utils.SecurityUtils;

/**
 * 归档流程信息对象 YQDA_WORKFLOW_ARCHIVE_SAVE
 * 
 * @author lyk
 * @date 2023-07-28
 */
public class YqdaWorkflowArchiveSave extends BaseEntity
{
    private static final long serialVersionUID = 1L;
    private final String BIGTABLENAME = "_WORKFLOW_ARCHIVE_SAVE";
    public YqdaWorkflowArchiveSave() {
        String tenantCode = SecurityUtils.getTenantCode();
        if(StringUtils.isEmpty(tenantCode)){
            tenantCode = SecurityUtils.getLoginUser().getUser().getTenantCode();
            if (StringUtils.isEmpty(tenantCode)){
                throw new ServiceException("TenantCode is null");
            }
        }
        this.tableName = tenantCode.toUpperCase()+BIGTABLENAME;
    }
    private String tableName;

    public String getTableName() {
        return tableName;
    }

    public void setTableName(String tableName) {
        this.tableName = tableName;
    }

    /** 主键ID */
    private String ID;

    /** 类型 */
    @Excel(name = "类型")
    private String TYPE;

    /** 标题 */
    @Excel(name = "标题")
    private String TITLE;

    /** 原因 */
    @Excel(name = "原因")
    private String REASON;

    /** 开始时间 */
    @Excel(name = "开始时间")
    private String archiveStartTime;

    /** 结束时间 */
    @Excel(name = "结束时间")
    private String archiveEndTime;

    /** 附件 */
    @Excel(name = "附件")
    private String attachmentLink;

    /** 流程实例ID */
    @Excel(name = "流程实例ID")
    private String instanceId;

    /** 状态 */
    @Excel(name = "状态")
    private String STATE;

    /** 创建者名称 */
    @Excel(name = "创建者名称")
    private String createName;

    /** 租户代码 */
    @Excel(name = "租户代码")
    private String tenantCode;

    /** bpmn流程图片地址 */
    private String bpmnUrl;


    public String getBpmnUrl() {
        return bpmnUrl;
    }

    public void setBpmnUrl(String bpmnUrl) {
        this.bpmnUrl = bpmnUrl;
    }

    public void setID(String ID)
    {
        this.ID = ID;
    }

    public String getID() 
    {
        return ID;
    }
    public void setTYPE(String TYPE) 
    {
        this.TYPE = TYPE;
    }

    public String getTYPE() 
    {
        return TYPE;
    }
    public void setTITLE(String TITLE) 
    {
        this.TITLE = TITLE;
    }

    public String getTITLE() 
    {
        return TITLE;
    }
    public void setREASON(String REASON) 
    {
        this.REASON = REASON;
    }

    public String getREASON() 
    {
        return REASON;
    }
    public void setArchiveStartTime(String archiveStartTime) 
    {
        this.archiveStartTime = archiveStartTime;
    }

    public String getArchiveStartTime() 
    {
        return archiveStartTime;
    }
    public void setArchiveEndTime(String archiveEndTime) 
    {
        this.archiveEndTime = archiveEndTime;
    }

    public String getArchiveEndTime() 
    {
        return archiveEndTime;
    }
    public void setAttachmentLink(String attachmentLink) 
    {
        this.attachmentLink = attachmentLink;
    }

    public String getAttachmentLink() 
    {
        return attachmentLink;
    }
    public void setInstanceId(String instanceId) 
    {
        this.instanceId = instanceId;
    }

    public String getInstanceId() 
    {
        return instanceId;
    }
    public void setSTATE(String STATE) 
    {
        this.STATE = STATE;
    }

    public String getSTATE() 
    {
        return STATE;
    }
    public void setCreateName(String createName) 
    {
        this.createName = createName;
    }

    public String getCreateName() 
    {
        return createName;
    }
    public void setTenantCode(String tenantCode) 
    {
        this.tenantCode = tenantCode;
    }

    public String getTenantCode() 
    {
        return tenantCode;
    }

    @Override
    public String toString() {
        return "YqdaWorkflowArchiveSave{" +
                "tableName='" + tableName + '\'' +
                ", ID='" + ID + '\'' +
                ", TYPE='" + TYPE + '\'' +
                ", TITLE='" + TITLE + '\'' +
                ", REASON='" + REASON + '\'' +
                ", archiveStartTime='" + archiveStartTime + '\'' +
                ", archiveEndTime='" + archiveEndTime + '\'' +
                ", attachmentLink='" + attachmentLink + '\'' +
                ", instanceId='" + instanceId + '\'' +
                ", STATE='" + STATE + '\'' +
                ", createName='" + createName + '\'' +
                ", tenantCode='" + tenantCode + '\'' +
                ", bpmnUrl='" + bpmnUrl + '\'' +
                '}';
    }
}
